package com.biz.primus.management.commodity.feign;

import com.biz.primus.commodity.vo.GroupProductDetailVo;
import com.biz.primus.commodity.vo.GroupProductVo;
import com.biz.primus.commodity.vo.backend.GroupProductItemItemVo;
import com.biz.primus.commodity.vo.backend.GroupProductItemQueryVo;
import com.biz.primus.commodity.vo.backend.ProductVo;
import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.management.commodity.degraded.DegradedGroupProductFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 组合商品feignClient
 * @author wan
 */
@FeignClient(name = "service-commodity",qualifier = "groupProductFeignClient",fallback = DegradedGroupProductFeignClient.class)
public interface GroupProductFeignClient {


    /**
     * 查询-所有组合商品
     * @param queryVo
     * @return 所有组合商品
     */
    @PostMapping("soa/groupProductController/findGroupProductList")
    public SpringPageVO<GroupProductItemItemVo> findGroupProductList(@RequestBody GroupProductItemQueryVo queryVo);

    /**
     * 查询-所有商品
     * @return
     */
    @PostMapping("soa/groupProductController/findGroupProductSelectList")
    public List<ProductVo> findGroupProductSelectList();

    /**
     * 保存
     * @param groupProductVo
     */
    @PostMapping("soa/groupProductController/save")
    public void save(GroupProductVo groupProductVo);

    /**
     * 删除
     * @param id
     */
    @GetMapping("soa/groupProductController/del")
    public void del(@RequestParam("id") String id);

    /**
     * 查询-组合商品编辑信息
     * @param id
     * @return
     */
    @GetMapping("soa/groupProductController/findGroupProductById")
    public GroupProductVo findGroupProductById(@RequestParam("id") String id);
}
